package com.ruoyi.pollution.service.impl;

import java.util.Date;
import java.util.List;

import com.ruoyi.common.utils.uuid.UUID;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.pollution.mapper.BusPsBasTechnologyMapper;
import com.ruoyi.pollution.domain.BusPsBasTechnology;
import com.ruoyi.pollution.service.IBusPsBasTechnologyService;

/**
 * 处理工艺和设施Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-16
 */
@Service
public class BusPsBasTechnologyServiceImpl implements IBusPsBasTechnologyService 
{
    @Autowired
    private BusPsBasTechnologyMapper busPsBasTechnologyMapper;

    /**
     * 查询处理工艺和设施
     * 
     * @param id 处理工艺和设施主键
     * @return 处理工艺和设施
     */
    @Override
    public BusPsBasTechnology selectBusPsBasTechnologyById(String id)
    {
        return busPsBasTechnologyMapper.selectBusPsBasTechnologyById(id);
    }

    /**
     * 查询处理工艺和设施列表
     * 
     * @param busPsBasTechnology 处理工艺和设施
     * @return 处理工艺和设施
     */
    @Override
    public List<BusPsBasTechnology> selectBusPsBasTechnologyList(BusPsBasTechnology busPsBasTechnology)
    {
        return busPsBasTechnologyMapper.selectBusPsBasTechnologyList(busPsBasTechnology);
    }

    /**
     * 新增处理工艺和设施
     * 
     * @param busPsBasTechnology 处理工艺和设施
     * @return 结果
     */
    @Override
    public int insertBusPsBasTechnology(BusPsBasTechnology busPsBasTechnology)
    {
        busPsBasTechnology.setId(UUID.randomUUID().toString());
        busPsBasTechnology.setUpdateTime(new Date());
        return busPsBasTechnologyMapper.insertBusPsBasTechnology(busPsBasTechnology);
    }

    /**
     * 修改处理工艺和设施
     * 
     * @param busPsBasTechnology 处理工艺和设施
     * @return 结果
     */
    @Override
    public int updateBusPsBasTechnology(BusPsBasTechnology busPsBasTechnology)
    {
        return busPsBasTechnologyMapper.updateBusPsBasTechnology(busPsBasTechnology);
    }

    /**
     * 批量删除处理工艺和设施
     * 
     * @param ids 需要删除的处理工艺和设施主键
     * @return 结果
     */
    @Override
    public int deleteBusPsBasTechnologyByIds(String[] ids)
    {
        return busPsBasTechnologyMapper.deleteBusPsBasTechnologyByIds(ids);
    }

    /**
     * 删除处理工艺和设施信息
     * 
     * @param id 处理工艺和设施主键
     * @return 结果
     */
    @Override
    public int deleteBusPsBasTechnologyById(String id)
    {
        return busPsBasTechnologyMapper.deleteBusPsBasTechnologyById(id);
    }
}
